import http from '@/utils/http';

export const uploadAction = '/api/system/oss/upload'

/**
 * 获取对应OSS供应商的空间列表
 * @param ossName
 */
export function getBuckets(ossName) {
    return http({
        url: '/api/system/oss/getBuckets',
        method: 'get',
        params: ossName
    })
}

/**
 * 根据ID删除数据
 * @param id
 */
export function deleted(id) {
    return http({
        url: '/api/system/oss/delete/'+id,
        method: 'get'
    })
}

/**
 * 根据ID批量删除数据
 * @param id
 */
export function deletedBatch(ids) {
    return http({
        url: '/api/system/oss/deleteBatch/',
        method: 'get',
        params: ids
    })
}

/**
 * 根据IdD查询单条数据
 * @param id
 */
export function selectOne(id) {
    return http({
        url: '/api/system/oss/get/'+id,
        method: 'get'
    })
}

/**
 * 多条件查询数据列表
 * @param query
 */
export function selectList(query) {
    return http({
        url: '/api/system/oss/list',
        method: 'get',
        params: query
    })
}

